<div data-page="note-create" class="page navbar-through no-toolbar">

	<div class="navbar">
		<div class="navbar-inner">
			<div class="left">
				<a href="#" class="link back icon-only"><i class="ti-arrow-circle-left"></i></a>
			</div>
			<div class="center">填写请假条</div>
			<div class="right"></div>
		</div>
	</div>
	
	<div class="page-content">
		
		<form class="external" before-submit="vacationCheck" >
		
		<input type="hidden" name="form[name]" value="请假条">
		<input type="hidden" name="form[lastChecker]" value="<%= req.session.user.userid%>">
		<input type="hidden" name="form[type]" value="<%= sails.config.application.sysform.note%>">
		<input type="hidden" name="owner" value="<%= req.session.user.userid%>">
		<input type="hidden" name="form[owner]" value="<%= req.session.user.userid%>">
		
		<div class="content-block-title">基本信息</div>
		<div class="list-block">
			<ul>
				<li>
					<div class="item-content">
						<div class="item-inner">
							<div class="item-title label">开始时间</div>
							<div class="item-input">
								<input placeholder="开始时间" type="datetime-local" name="startTime" ptype="Date" required>
							</div>
						</div>
					</div>
				</li>

				<li>
					<div class="item-content">
						<div class="item-inner">
							<div class="item-title label">结束时间</div>
							<div class="item-input">
								<input placeholder="结束时间" type="datetime-local" name="endTime" ptype="Date" required>
							</div>
						</div>
					</div>
				</li>
				
				<li>
					<div class="item-content">
						<div class="item-inner">
							<div class="item-title label">小时数</div>
							<div class="item-input">
								<input maxlength="3" type="text" placeholder="小时数" value="3" name="hours" ptype="Number" required>
							</div>
						</div>
					</div>
				</li>
				
			</ul>
		</div>
		
		<div class="content-block-title">休假类型</div>
		<div class="list-block">
			<ul>
				<li>
					<a href="#" class="item-link smart-select" data-open-in="popup" data-back-on-select="true">
						<select name="type" required>
							<% leaveTypes.forEach(function(type){ %>
							<option value="<%=type.id%>"><%=type.name%></option>
							<% }) %>
						</select>
						<div class="item-content">
							<div class="item-inner">
								<div class="item-title">休假类型</div>
								<div class="item-after smart-select-value"><%=leaveTypes[0].name%></div>
							</div>
						</div>
					</a>
				</li>
			</ul>
		</div>
		
		<div class="content-block-title">休假原因</div>
		<div class="list-block">
			<ul>
				<li>
					<div class="item-content">
						<div class="item-inner">
							<div class="item-input">
								<input type="text" name="reason" required>
							</div>
						</div>
					</div>
				</li>
			</ul>
		</div>
		
		<div class="content-block">
			<p>
				<a href="#" api-path="/api/leavenote" cb-path="/note/list" class="button button-big button-fill color-cyan sails-btn-submit">保存</a>
			</p>
		</div>
		
		</form>

	</div>
</div>
